- /* slfdvhlf.cpp by K.Tsuru */
- // function ID = 221 DRADIX, BRADIX
- /******************************************************
- SLong class
- a sub-function for RecursiveKOMult()
- It sets the lower half of "x" into "lower" and the upper
- half into "upper".
- ******************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- void SLong::SLDivHalf(const SLong& x, SLong& lower, SLong& upper){
- uint half = x.figure.size()/2u;
- const fType* xpt = x.ReadFigures();
-
- lower.valloc(half, -1);
- memcpy(lower.figure.Elements(), xpt , half*sizeof(fType) );
- lower.SetSign(x.Sign());
- lower.CheckArray(221);
-
- if(x.Head() < half){
- upper.SetZero(); return;
- }
- upper.valloc(half, -1);
- memcpy(upper.figure.Elements(), (xpt+half) , half*sizeof(fType) );
- upper.SetSign(x.Sign());
- upper.CheckArray(221);
- }
slfdvhlf.cpp : last modifiled at 2017/03/13 14:32:00(845 bytes)
created at 2017/10/07 10:26:50
The creation time of this html file is 2017/11/09 14:52:03 (Thu Nov 09 14:52:03 2017).